package entity

import "ruoyi-go/utils"

// Model edge_alarm_data  告警数据表
type EdgeAlarmData struct {
	Id              int64          `json:"id" gorm:"primaryKey;column:id" form:"id"`                        //告警ID
	AlarmTime       utils.JsonTime `json:"alarmTime" gorm:"alarm_time" form:"alarmTime"`                    //告警时间
	AlarmType       string         `json:"alarmType" gorm:"alarm_type" form:"alarmType"`                    //告警类型：cheat-作弊预警，match-匹配失败，device-设备通讯异常
	AlarmSeverity   string         `json:"alarmSeverity" gorm:"alarm_severity" form:"alarmSeverity"`        //严重程度：high-高，medium-中，low-低
	DeviceId        string         `json:"deviceId" gorm:"device_id" form:"deviceId"`                       //设备编号
	Description     string         `json:"description" gorm:"description" form:"description"`               //告警描述
	Status          string         `json:"status" gorm:"status" form:"status"`                              //处理状态：pending-待处理，processed-已处理
	Detail          string         `json:"detail" gorm:"detail" form:"detail"`                              //告警详细日志
	Image           string         `json:"image" gorm:"image" form:"image"`                                 //现场图片1路径
	Image2          string         `json:"image2" gorm:"image2" form:"image2"`                              //现场图片2路径
	Image3          string         `json:"image3" gorm:"image3" form:"image3"`                              //现场图片3路径
	Image4          string         `json:"image4" gorm:"image4" form:"image4"`                              //现场图片4路径
	Processor       string         `json:"processor" gorm:"processor" form:"processor"`                     //处理人
	ProcessTime     utils.JsonTime `json:"processTime" gorm:"process_time" form:"processTime"`              //处理时间
	ProcessComment  string         `json:"processComment" gorm:"process_comment" form:"processComment"`     //处理意见
	CreateTime      utils.JsonTime `json:"createTime" gorm:"create_time" form:"createTime"`                 //创建时间
	UpdateTime      utils.JsonTime `json:"updateTime" gorm:"update_time" form:"updateTime"`                 //更新时间
	AlarmDataField1 string         `json:"alarmDataField1" gorm:"alarm_data_field1" form:"alarmDataField1"` //备用字段1
	AlarmDataField2 string         `json:"alarmDataField2" gorm:"alarm_data_field2" form:"alarmDataField2"` //备用字段2
	AlarmDataField3 string         `json:"alarmDataField3" gorm:"alarm_data_field3" form:"alarmDataField3"` //备用字段3
	AlarmDataField4 string         `json:"alarmDataField4" gorm:"alarm_data_field4" form:"alarmDataField4"` //备用字段4
	AlarmDataField5 string         `json:"alarmDataField5" gorm:"alarm_data_field5" form:"alarmDataField5"` //备用字段5
}

func (EdgeAlarmData) TableName() string {
	return "edge_alarm_data"
}

type EdgeAlarmDataPageReq struct {
	Pager
	TimeParams
	Id              int64          `json:"id" gorm:"primaryKey;column:id" form:"id"`                        //告警ID
	AlarmTime       utils.JsonTime `json:"alarmTime" gorm:"alarm_time" form:"alarmTime"`                    //告警时间
	AlarmType       string         `json:"alarmType" gorm:"alarm_type" form:"alarmType"`                    //告警类型：cheat-作弊预警，match-匹配失败，device-设备通讯异常
	AlarmSeverity   string         `json:"alarmSeverity" gorm:"alarm_severity" form:"alarmSeverity"`        //严重程度：high-高，medium-中，low-低
	DeviceId        string         `json:"deviceId" gorm:"device_id" form:"deviceId"`                       //设备编号
	Description     string         `json:"description" gorm:"description" form:"description"`               //告警描述
	Status          string         `json:"status" gorm:"status" form:"status"`                              //处理状态：pending-待处理，processed-已处理
	Detail          string         `json:"detail" gorm:"detail" form:"detail"`                              //告警详细日志
	Image           string         `json:"image" gorm:"image" form:"image"`                                 //现场图片1路径
	Image2          string         `json:"image2" gorm:"image2" form:"image2"`                              //现场图片2路径
	Image3          string         `json:"image3" gorm:"image3" form:"image3"`                              //现场图片3路径
	Image4          string         `json:"image4" gorm:"image4" form:"image4"`                              //现场图片4路径
	Processor       string         `json:"processor" gorm:"processor" form:"processor"`                     //处理人
	ProcessTime     utils.JsonTime `json:"processTime" gorm:"process_time" form:"processTime"`              //处理时间
	ProcessComment  string         `json:"processComment" gorm:"process_comment" form:"processComment"`     //处理意见
	CreateTime      utils.JsonTime `json:"createTime" gorm:"create_time" form:"createTime"`                 //创建时间
	UpdateTime      utils.JsonTime `json:"updateTime" gorm:"update_time" form:"updateTime"`                 //更新时间
	AlarmDataField1 string         `json:"alarmDataField1" gorm:"alarm_data_field1" form:"alarmDataField1"` //备用字段1
	AlarmDataField2 string         `json:"alarmDataField2" gorm:"alarm_data_field2" form:"alarmDataField2"` //备用字段2
	AlarmDataField3 string         `json:"alarmDataField3" gorm:"alarm_data_field3" form:"alarmDataField3"` //备用字段3
	AlarmDataField4 string         `json:"alarmDataField4" gorm:"alarm_data_field4" form:"alarmDataField4"` //备用字段4
	AlarmDataField5 string         `json:"alarmDataField5" gorm:"alarm_data_field5" form:"alarmDataField5"` //备用字段5
}
